<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>sampleFile - OpenGrok cross reference for /sampleFile</title></head><body>
<script type="text/javascript">/* <![CDATA[ */
function get_sym_list(){return [["Class","xc",[["InnerClass",47],["Sample",25]]],["Package","xp",[["org.opensolaris.opengrok.analysis.java",23]]],["Method","xmt",[["AbstractMethod",43],["InnerMethod",49],["Method",33],["Sample",29],["main",62]]]];} /* ]]> */</script><a class="l" name="1" href="#1">1</a><span class='fold-space'>&nbsp;</span><span class="c">/*
<a class="l" name="2" href="#2">2</a><span class='fold-space'>&nbsp;</span> * CDDL HEADER START
<a class="l" name="3" href="#3">3</a><span class='fold-space'>&nbsp;</span> *
<a class="l" name="4" href="#4">4</a><span class='fold-space'>&nbsp;</span> * The contents of this file are subject to the terms of the
<a class="l" name="5" href="#5">5</a><span class='fold-space'>&nbsp;</span> * Common Development and Distribution License (the &quot;License&quot;).
<a class="l" name="6" href="#6">6</a><span class='fold-space'>&nbsp;</span> * You may not use this file except in compliance with the License.
<a class="l" name="7" href="#7">7</a><span class='fold-space'>&nbsp;</span> *
<a class="l" name="8" href="#8">8</a><span class='fold-space'>&nbsp;</span> * See <a href="/source/s?path=LICENSE.txt">LICENSE.txt</a> included in this distribution for the specific
<a class="l" name="9" href="#9">9</a><span class='fold-space'>&nbsp;</span> * language governing permissions and limitations under the License.
<a class="hl" name="10" href="#10">10</a><span class='fold-space'>&nbsp;</span> *
<a class="l" name="11" href="#11">11</a><span class='fold-space'>&nbsp;</span> * When distributing Covered Code, include this CDDL HEADER in each
<a class="l" name="12" href="#12">12</a><span class='fold-space'>&nbsp;</span> * file and include the License file at <a href="/source/s?path=LICENSE.txt">LICENSE.txt</a>.
<a class="l" name="13" href="#13">13</a><span class='fold-space'>&nbsp;</span> * If applicable, add the following below this CDDL HEADER, with the
<a class="l" name="14" href="#14">14</a><span class='fold-space'>&nbsp;</span> * fields enclosed by brackets &quot;[]&quot; replaced with your own identifying
<a class="l" name="15" href="#15">15</a><span class='fold-space'>&nbsp;</span> * information: Portions Copyright [yyyy] [name of copyright owner]
<a class="l" name="16" href="#16">16</a><span class='fold-space'>&nbsp;</span> *
<a class="l" name="17" href="#17">17</a><span class='fold-space'>&nbsp;</span> * CDDL HEADER END
<a class="l" name="18" href="#18">18</a><span class='fold-space'>&nbsp;</span> */</span>
<a class="l" name="19" href="#19">19</a><span class='fold-space'>&nbsp;</span>
<a class="hl" name="20" href="#20">20</a><span class='fold-space'>&nbsp;</span><span class="c">/*
<a class="l" name="21" href="#21">21</a><span class='fold-space'>&nbsp;</span> * Copyright (c) 2017, Oracle <a href="/source/s?path=and/">and</a>/<a href="/source/s?path=and/or">or</a> its affiliates. All rights reserved.
<a class="l" name="22" href="#22">22</a><span class='fold-space'>&nbsp;</span> */</span>
<a class="l" name="23" href="#23">23</a><span class='fold-space'>&nbsp;</span><b>package</b> <a href="/source/s?defs=org" class="intelliWindow-symbol" data-definition-place="undefined-in-file">org</a>.<a href="/source/s?defs=opensolaris" class="intelliWindow-symbol" data-definition-place="undefined-in-file">opensolaris</a>.<a href="/source/s?defs=opengrok" class="intelliWindow-symbol" data-definition-place="undefined-in-file">opengrok</a>.<a href="/source/s?defs=analysis" class="intelliWindow-symbol" data-definition-place="undefined-in-file">analysis</a>.<a href="/source/s?defs=java" class="intelliWindow-symbol" data-definition-place="undefined-in-file">java</a>&#59;
<a class="l" name="24" href="#24">24</a><span class='fold-space'>&nbsp;</span>
<a class="l" name="25" href="#25">25</a><span class='fold-space'>&nbsp;</span><b>public</b> <b>class</b> <a class="xc" name="Sample"/><a href="/source/s?refs=Sample" class="xc intelliWindow-symbol" data-definition-place="def">Sample</a> &#123;
<a class="l" name="26" href="#26">26</a><span class='fold-space'>&nbsp;</span>
<a class="l" name="27" href="#27">27</a><span class='fold-space'>&nbsp;</span>    <b>static</b> <b>private</b> <a href="/source/s?defs=String" class="intelliWindow-symbol" data-definition-place="undefined-in-file">String</a> <a class="xfld" name="MY_MEMBER"/><a href="/source/s?refs=MY_MEMBER" class="xfld intelliWindow-symbol" data-definition-place="def">MY_MEMBER</a> = <span class="s">&quot;value&quot;</span>&#59;
<a class="l" name="28" href="#28">28</a><span class='fold-space'>&nbsp;</span>
<span id='scope_id_332feb92' class='scope-head'><span class='scope-signature'>Sample()</span><a class="l" name="29" href="#29">29</a><a style='cursor:pointer;' onclick='fold(this.parentNode.id)' id='scope_id_332feb92_fold_icon'><span class='fold-icon'>&nbsp;</span></a>    <b>public</b> <a class="xmt" name="Sample"/><a href="/source/s?refs=Sample" class="xmt intelliWindow-symbol" data-definition-place="def">Sample</a>() &#123;</span>
<span id='scope_id_332feb92_fold' class='scope-body'><a class="hl" name="30" href="#30">30</a><span class='fold-space'>&nbsp;</span>
<a class="l" name="31" href="#31">31</a><span class='fold-space'>&nbsp;</span>    &#125;
</span><a class="l" name="32" href="#32">32</a><span class='fold-space'>&nbsp;</span>
<span id='scope_id_9da6e00b' class='scope-head'><span class='scope-signature'>Method(int arg)</span><a class="l" name="33" href="#33">33</a><a style='cursor:pointer;' onclick='fold(this.parentNode.id)' id='scope_id_9da6e00b_fold_icon'><span class='fold-icon'>&nbsp;</span></a>    <b>public</b> <b>int</b> <a class="xmt" name="Method"/><a href="/source/s?refs=Method" class="xmt intelliWindow-symbol" data-definition-place="def">Method</a>(<b>int</b> <a class="xa" name="arg"/><a href="/source/s?refs=arg" class="xa intelliWindow-symbol" data-definition-place="def">arg</a>) &#123;</span>
<span id='scope_id_9da6e00b_fold' class='scope-body'><a class="l" name="34" href="#34">34</a><span class='fold-space'>&nbsp;</span>        <b>int</b> <a class="xl" name="res"/><a href="/source/s?refs=res" class="xl intelliWindow-symbol" data-definition-place="def">res</a> = <span class="n">5</span>&#59;
<a class="l" name="35" href="#35">35</a><span class='fold-space'>&nbsp;</span>
<a class="l" name="36" href="#36">36</a><span class='fold-space'>&nbsp;</span>        <a class="d intelliWindow-symbol" href="#res" data-definition-place="defined-in-file">res</a> += <a class="d intelliWindow-symbol" href="#arg" data-definition-place="defined-in-file">arg</a>&#59;
<a class="l" name="37" href="#37">37</a><span class='fold-space'>&nbsp;</span>
<a class="l" name="38" href="#38">38</a><span class='fold-space'>&nbsp;</span>        <a class="d intelliWindow-symbol" href="#InnerClass" data-definition-place="defined-in-file">InnerClass</a> <a class="xl" name="i"/><a href="/source/s?refs=i" class="xl intelliWindow-symbol" data-definition-place="def">i</a> = <b>new</b> <a class="d intelliWindow-symbol" href="#InnerClass" data-definition-place="defined-in-file">InnerClass</a>()&#59;
<a class="l" name="39" href="#39">39</a><span class='fold-space'>&nbsp;</span>
<a class="hl" name="40" href="#40">40</a><span class='fold-space'>&nbsp;</span>        <b>return</b> <a class="d intelliWindow-symbol" href="#i" data-definition-place="defined-in-file">i</a>.<a class="d intelliWindow-symbol" href="#InnerMethod" data-definition-place="defined-in-file">InnerMethod</a>().<a href="/source/s?defs=length" class="intelliWindow-symbol" data-definition-place="undefined-in-file">length</a>() * <a class="d intelliWindow-symbol" href="#res" data-definition-place="defined-in-file">res</a>&#59;
<a class="l" name="41" href="#41">41</a><span class='fold-space'>&nbsp;</span>    &#125;
</span><a class="l" name="42" href="#42">42</a><span class='fold-space'>&nbsp;</span>
<span id='scope_id_bedfb0c0' class='scope-head'><span class='scope-signature'>AbstractMethod(int test)</span><a class="l" name="43" href="#43">43</a><a style='cursor:pointer;' onclick='fold(this.parentNode.id)' id='scope_id_bedfb0c0_fold_icon'><span class='fold-icon'>&nbsp;</span></a>    <b>public</b> <b>int</b> <a class="xmt" name="AbstractMethod"/><a href="/source/s?refs=AbstractMethod" class="xmt intelliWindow-symbol" data-definition-place="def">AbstractMethod</a>(<b>int</b> <a class="xa" name="test"/><a href="/source/s?refs=test" class="xa intelliWindow-symbol" data-definition-place="def">test</a>) &#123;</span>
<span id='scope_id_bedfb0c0_fold' class='scope-body'><a class="l" name="44" href="#44">44</a><span class='fold-space'>&nbsp;</span>        <b>return</b> <span class="n">0</span>&#59;
<a class="l" name="45" href="#45">45</a><span class='fold-space'>&nbsp;</span>    &#125;
</span><a class="l" name="46" href="#46">46</a><span class='fold-space'>&nbsp;</span>
<a class="l" name="47" href="#47">47</a><span class='fold-space'>&nbsp;</span>    <b>private</b> <b>class</b> <a class="xc" name="InnerClass"/><a href="/source/s?refs=InnerClass" class="xc intelliWindow-symbol" data-definition-place="def">InnerClass</a> &#123;
<a class="l" name="48" href="#48">48</a><span class='fold-space'>&nbsp;</span>
<span id='scope_id_27ccc793' class='scope-head'><span class='scope-signature'>InnerMethod()</span><a class="l" name="49" href="#49">49</a><a style='cursor:pointer;' onclick='fold(this.parentNode.id)' id='scope_id_27ccc793_fold_icon'><span class='fold-icon'>&nbsp;</span></a>        <b>public</b> <a href="/source/s?defs=String" class="intelliWindow-symbol" data-definition-place="undefined-in-file">String</a> <a class="xmt" name="InnerMethod"/><a href="/source/s?refs=InnerMethod" class="xmt intelliWindow-symbol" data-definition-place="def">InnerMethod</a>() &#123;</span>
<span id='scope_id_27ccc793_fold' class='scope-body'><a class="hl" name="50" href="#50">50</a><span class='fold-space'>&nbsp;</span>            <span class="c">// somthing } */</span>
<a class="l" name="51" href="#51">51</a><span class='fold-space'>&nbsp;</span>            <span class="c">/* }}}
<a class="l" name="52" href="#52">52</a><span class='fold-space'>&nbsp;</span>                multi-line comment }{}
<a class="l" name="53" href="#53">53</a><span class='fold-space'>&nbsp;</span>            */</span>
<a class="l" name="54" href="#54">54</a><span class='fold-space'>&nbsp;</span>
<a class="l" name="55" href="#55">55</a><span class='fold-space'>&nbsp;</span>            <a href="/source/s?defs=System" class="intelliWindow-symbol" data-definition-place="undefined-in-file">System</a>.<a href="/source/s?defs=out" class="intelliWindow-symbol" data-definition-place="undefined-in-file">out</a>.<a href="/source/s?defs=print" class="intelliWindow-symbol" data-definition-place="undefined-in-file">print</a>(<span class="s">&quot;I&apos;m so useless&quot;</span>)&#59;
<a class="l" name="56" href="#56">56</a><span class='fold-space'>&nbsp;</span>
<a class="l" name="57" href="#57">57</a><span class='fold-space'>&nbsp;</span>            <b>return</b> <span class="s">&quot;Why do robots need to drink?&quot;</span>&#59;
<a class="l" name="58" href="#58">58</a><span class='fold-space'>&nbsp;</span>        &#125;
</span><a class="l" name="59" href="#59">59</a><span class='fold-space'>&nbsp;</span>
<a class="hl" name="60" href="#60">60</a><span class='fold-space'>&nbsp;</span>    &#125;
<a class="l" name="61" href="#61">61</a><span class='fold-space'>&nbsp;</span>
<span id='scope_id_3b67212e' class='scope-head'><span class='scope-signature'>main(String args[])</span><a class="l" name="62" href="#62">62</a><a style='cursor:pointer;' onclick='fold(this.parentNode.id)' id='scope_id_3b67212e_fold_icon'><span class='fold-icon'>&nbsp;</span></a>    <b>public</b> <b>static</b> <b>void</b> <a class="xmt" name="main"/><a href="/source/s?refs=main" class="xmt intelliWindow-symbol" data-definition-place="def">main</a>(<a href="/source/s?defs=String" class="intelliWindow-symbol" data-definition-place="undefined-in-file">String</a> <a class="xa" name="args"/><a href="/source/s?refs=args" class="xa intelliWindow-symbol" data-definition-place="def">args</a>[]) &#123;</span>
<span id='scope_id_3b67212e_fold' class='scope-body'><a class="l" name="63" href="#63">63</a><span class='fold-space'>&nbsp;</span>        <b>int</b> <a class="xl" name="num1"/><a href="/source/s?refs=num1" class="xl intelliWindow-symbol" data-definition-place="def">num1</a>, <a class="xl" name="num2"/><a href="/source/s?refs=num2" class="xl intelliWindow-symbol" data-definition-place="def">num2</a>&#59;
<a class="l" name="64" href="#64">64</a><span class='fold-space'>&nbsp;</span>        <b>try</b> &#123;
<a class="l" name="65" href="#65">65</a><span class='fold-space'>&nbsp;</span>            <span class="c">// Try block to handle code that may cause exception</span>
<a class="l" name="66" href="#66">66</a><span class='fold-space'>&nbsp;</span>            <a class="d intelliWindow-symbol" href="#num1" data-definition-place="defined-in-file">num1</a> = <span class="n">0</span>&#59;
<a class="l" name="67" href="#67">67</a><span class='fold-space'>&nbsp;</span>            <a class="d intelliWindow-symbol" href="#num2" data-definition-place="defined-in-file">num2</a> = <span class="n">62</span> * <span class="n">0xFFFF</span> / <a class="d intelliWindow-symbol" href="#num1" data-definition-place="defined-in-file">num1</a>&#59;
<a class="l" name="68" href="#68">68</a><span class='fold-space'>&nbsp;</span>            <a href="/source/s?defs=System" class="intelliWindow-symbol" data-definition-place="undefined-in-file">System</a>.<a href="/source/s?defs=out" class="intelliWindow-symbol" data-definition-place="undefined-in-file">out</a>.<a href="/source/s?defs=println" class="intelliWindow-symbol" data-definition-place="undefined-in-file">println</a>(<span class="s">&quot;Try block message&quot;</span>)&#59;
<a class="l" name="69" href="#69">69</a><span class='fold-space'>&nbsp;</span>        &#125; <b>catch</b> (<a href="/source/s?defs=ArithmeticException" class="intelliWindow-symbol" data-definition-place="undefined-in-file">ArithmeticException</a> <a href="/source/s?defs=e" class="intelliWindow-symbol" data-definition-place="undefined-in-file">e</a>) &#123;
<a class="hl" name="70" href="#70">70</a><span class='fold-space'>&nbsp;</span>            <span class="c">// This block is to catch divide-by-zero error</span>
<a class="l" name="71" href="#71">71</a><span class='fold-space'>&nbsp;</span>            <a href="/source/s?defs=System" class="intelliWindow-symbol" data-definition-place="undefined-in-file">System</a>.<a href="/source/s?defs=out" class="intelliWindow-symbol" data-definition-place="undefined-in-file">out</a>.<a href="/source/s?defs=println" class="intelliWindow-symbol" data-definition-place="undefined-in-file">println</a>(<span class="s">&quot;Error: Don&apos;t divide a number by zero&quot;</span>)&#59;
<a class="l" name="72" href="#72">72</a><span class='fold-space'>&nbsp;</span>        &#125;
<a class="l" name="73" href="#73">73</a><span class='fold-space'>&nbsp;</span>        <a href="/source/s?defs=System" class="intelliWindow-symbol" data-definition-place="undefined-in-file">System</a>.<a href="/source/s?defs=out" class="intelliWindow-symbol" data-definition-place="undefined-in-file">out</a>.<a href="/source/s?defs=println" class="intelliWindow-symbol" data-definition-place="undefined-in-file">println</a>(<span class="s">&quot;I&apos;m out of try-catch block in Java.&quot;</span>)&#59;
<a class="l" name="74" href="#74">74</a><span class='fold-space'>&nbsp;</span>    &#125;
</span><a class="l" name="75" href="#75">75</a><span class='fold-space'>&nbsp;</span>
<a class="l" name="76" href="#76">76</a><span class='fold-space'>&nbsp;</span>&#125;
<a class="l" name="77" href="#77">77</a><span class='fold-space'>&nbsp;</span><span class="c">/*<a href="http://example.com">http://example.com</a>*/</span>
<a class="l" name="78" href="#78">78</a><span class='fold-space'>&nbsp;</span></body>
</html>
